import {SYSTEM_WINDOW_INFO,MENU_BUTTON_RECT_INFO} from "@/utils/config.js"
import { computed, unref } from "vue"
//状态栏高度
export const statusBarH=computed(()=>SYSTEM_WINDOW_INFO.statusBarHeight||25)


//标题栏高度
export  const titleBH =computed(()=>{
	const {top,height }=MENU_BUTTON_RECT_INFO;
	if(!top||!height) return 40;
	return height+(top-unref(statusBarH))*2
})

export const useNavBArStype=()=>{
	const statusBarheight=computed(()=>statusBarH.value+"px");
	const titleBarHeight=computed(()=>titleBH.value+"px");
	const headHeight=computed(()=>(statusBarH.value+titleBH.value)+"px");
	return {
		statusBarheight,
		titleBarHeight,
		headHeight
	}
}